<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .mask-zt {
            padding: 15px;
            z-index: 2;
            position: relative;
            height: 150px;
            background-color: hotpink;
        }

        .mask-zt:after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0px;
            right: 0px;
            background: rgba(0, 0, 0, 0.6);
            height: 100%;
            z-index: -1;
        }

        .mask-zt:hover {
            background: rgba(0, 0, 0, 0);
        }
    </style>
</head>

<body>
    <div class="mask-zt">
        <p>text</p>
    </div>




</body>

</html>